package com.atguigu.edu.client;

import com.atguigu.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * openFeign远程调用
 * 如果远程调用失败 则会调用fallback中的实现
 */
@Component
@FeignClient(value = "service-vod", fallback = VodClientImpl.class)
public interface VodClient {

    @DeleteMapping("/eduvod/service/delVideo/{id}")
    public R delVideo(@PathVariable("id") String id);

    @DeleteMapping("/eduvod/service/delVideoByList")
    public R delVideoByList(@RequestParam List<String> ids);
}
